package com.xiangxiao.rpan.storage.param;

import com.xiangxiao.rpan.storage.anotion.StorageParamItem;
import com.xiangxiao.rpan.storage.enums.StorageParamTypeEnum;
import com.xiangxiao.rpan.storage.params.IStorageParam;
import lombok.Getter;

/**
 * @auther xiangxiao
 * @email 573768011@qq.com
 * @data 2023/11/10 14:29
 */
@Getter
public class LocalParam implements IStorageParam {
  @StorageParamItem(name = "加速域名", required = false, description = "如不配置加速域名，则使用服务器中转下载, 反之则使用加速域名下载.")
  // 加速域名
  private String domain;

  @StorageParamItem(name = "生成签名链接", defaultValue = "true", description = "下载会生成带签名的下载链接, 如不想对外开放直链, 可以防止被当做直链使用.")
  // 是否生成签名链接
  private boolean isPrivate;

  @StorageParamItem(name = "下载签名有效期", required = false, defaultValue = "1800", description = "用于下载签名的有效期, 单位为秒, 如不配置则默认为 1800 秒.")
  // 下载签名有效期
  private Integer tokenTime;

  @StorageParamItem(name = "文件路径", defaultValue = "/mydata/testFile/local", description = "只支持绝对路径<br>Docker 方式部署的话需提前映射宿主机路径！ " +
      "(<a class='link' target='_blank' href='https://docs.docker.com/engine/reference/run/#volume-shared-filesystems'>配置文档</a>)")
  // 文件路径(绝对路径)
  private String filePath;

}
